<template>
  <w-dialog class="f-dfish-dialog">
    <w-horizontal class="f-dfish-dialog-head" height="40">
      <w-dialog-move>
        <w-html class="f-dfish-dialog-title" width="*">{{title}}</w-html>
      </w-dialog-move>
      <w-html class="f-dfish-dialog-close" width="40" @click="close"><i class="f-i f-i-close"></i></w-html>
    </w-horizontal>
    <w-vertical height="*" class="f-dfish-dialog-body">
      <slot name="default"></slot>
    </w-vertical>
    <w-horizontal class="f-dfish-dialog-foot" height="56">
      <slot name="foot">
        <w-buttonbar width="*" height="*" align="right" gap="10" style="padding-right: 20px">
          <w-button text="取消" @click="close"></w-button>
        </w-buttonbar>
      </slot>
    </w-horizontal>
  </w-dialog>
</template>

<script>
  import $ from '../dfish.js'

  export default {
    props: ['title'],
    data() {
      return {x: this.$attrs}
    },
    methods: {
      close(e) {
        $.close(e)
      }
    }
  }
</script>

<style>

</style>
